<template>

  <div id="app">
<!--    <img src="./assets/logo.png">-->
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  created() {
    let storeData=sessionStorage.getItem('storeData')
    console.log(storeData+"1112")
    if (storeData!=null){
      this.$store.replaceState(this.$qs.parse(storeData))
    }
    window.addEventListener('beforeunload',()=>{
      console.log("刷新页面")
      sessionStorage.setItem('storeData',this.$qs.stringify(this.$store.state))
    })
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
